<header class="container-fluid main-color" id="embed_page_header">
    <div class="row">
        <div class="col-3 col-sm-2 col-md-2 text-center"><a href="javascript:;" role="button" class="btn historyBack"><i class="ico mdi mdi-chevron-left"></i></a></div>
        <div class="col-6 col-sm-8 col-md-8 embed_header_title">{{sendNickname}}的消息</div>
        <div class="col-3 col-sm-2 col-md-2 text-center"><a href="javascript:;" role="button" class="btn" title="标记为已读" (click)="readed(sender)"><i class="ico-sm mdi mdi-check-all"></i></a></div>
    </div>
</header>
<div id="embed_page">
    <div class="alert alert-warning" role="alert" *ngIf="errorMessage.length>0">
        {{errorMessage}}
    </div>
    <div class="container" id="chat-pagebox">
        <!-- 消息记录正区开始 -->
        <div class="letter-item-collect" id="letter-result-box">
            <p class="text-center" *ngIf="hasNext"><a (click)="anymore($event)" class="txt-sm p-2 letter-more-action" href="javascript:;">更多历史消息</a></p>
            <div class="media letter-embed" [ngClass]="{'media-master': curMember.id === item.sender, 'w-100': robot}" *ngFor="let item of items">
                <div class="media-avatar media-left">
                    <a href="javascript:;">
                        <app-member-avatar [uid]="item.sender" [scale]="50"></app-member-avatar>
                    </a>
                </div>
                <div class="media-body">
                    <div class="media-bubble">
                        <h6 class="media-heading"><small class="message-item-stamp">{{item.entryDatetime|amTimeAgo}}</small></h6>
                        <strong *ngIf="item.sender === 0">{{item.subject}}</strong>
                        <p class="message-item-content" [innerHTML]="item.body"></p>
                    </div>
                </div>
            </div>
            
        </div>
    </div>
</div>
<!-- 消息记录正区结束 -->
<footer class="container-fluid main-color common-bottom-bar" id="embed_page_footer" *ngIf="!robot">
    <div class="row">
        <div class="col-10 col-sm-10 col-md-11" style="padding-right:0;display: table;padding-top: 5px;">
            <div class="common-bottom-bar-form main-bg">
                <label><app-member-local-avatar [link]="curMember.avatar" [scale]="32"></app-member-local-avatar></label>
                <span class="bmd-form-group">
                    <input type="text" name="content" [(ngModel)]="form.content" placeholder="在此输入消息内容"/>
                </span>
            </div>
        </div>
        <div class="col-2 col-sm-2 col-md-1 text-center common-bottom-bar-tool">
            <a href="javascript:;" role="button" data-acctip="false" title="点击回复" class="message-reply btn btn-sm btn-primary" (click)="sendMessage($event)" *ngIf="!robot">
                <i class="ico mdi mdi-mail-send"></i>
            </a>
        </div>
    </div>
</footer>